package practise.sort.javaSort;

import practise.sort.Person;

/**
 * Created by richard on 5/6/14.
 */
public class ComparablePerson extends Person implements Comparable<Person> {

    public ComparablePerson(int age, String name) {
        super(age, name);
    }

    @Override
    public int compareTo(Person o) {
        return this.getAge()-((Person)o).getAge();
    }
}
